//
//  QJMineTableViewCell.m
//  QuanJieShopProject
//
//  Created by apple on 2018/2/1.
//  Copyright © 2018年 apple. All rights reserved.
//

#import "QJMineTableViewCell.h"

@implementation QJMineTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.cellTitle.font = kFont30px;
    // Initialization code
}
-(void)cellUpdateWithIndex:(NSIndexPath *)indexPath{
    switch (indexPath.section) {
        case 0:
        {
            //第0分区
            switch (indexPath.row) {
                case 0:
                {
                    self.cellImage.image = KImageName(@"Mshouyi");
                    self.cellTitle.text = @"我的收益";
                }
                    break;
                case 1:
                {
                    self.cellImage.image = KImageName(@"Mshoucang");
                    self.cellTitle.text = @"我的收藏";
                }
                    break;
                case 2:
                {
                    self.cellImage.image = KImageName(@"Myinhang");
                    self.cellTitle.text = @"我的足迹";
                }
                    break;
                case 3:
                {
                    self.cellImage.image = KImageName(@"Myinhang");
                    self.cellTitle.text = @"银行卡";
                    
                }
                    break;
                case 4:
                {
                    ///*
                    if (_userState == 0 || _userState == -1) { // 0 未审核  都是’’成为创客”
                        self.cellImage.image = KImageName(@"Mchuangke");
                        self.cellTitle.text = @"成为创客";
                        self.hidden = YES;
                    }else if (_userState == 1) { // 1 审核通过  “收款二维码”
                        self.cellImage.image = KImageName(@"Mshoukuan");
                        self.cellTitle.text = @"收款二维码";
                    }else if (_userState == 2) { //  2 审核未通过
                        
                        // 2 是泉界创客  什么都不显示   1/3 都显示”成为创客”
                        self.cellImage.image = KImageName(@"Mchuangke");
                        self.cellTitle.text = @"成为创客";
                        // 这里不用判断2了, 2类型的cell只有3个,根本不会掉这里
                    }
                    
                    
                    //*/
                }
                    break;
                default:
                    break;
            }
            
        }
            break;
            
        case 1:
        {
            //第1分区
            switch (indexPath.row) {
                case 0:
                {
                    self.cellImage.image = KImageName(@"Mtuijian");
                    self.cellTitle.text = @"推荐关系";
                }
                    break;
                case 1:
                {
                    self.cellImage.image = KImageName(@"Mdizhi");
                    self.cellTitle.text = @"地址管理";
                }
                    break;
                case 2:
                {
                    self.cellImage.image = KImageName(@"Myaoqing");
                    self.cellTitle.text = @"邀请注册";
                }
                    break;
                case 3:
                {
                    self.cellImage.image = KImageName(@"kefu");
                    self.cellTitle.text = @"联系客服";
                }
                    break;
               
                case 4:
                {
                    self.cellImage.image = KImageName(@"kaidian");
                    self.cellTitle.text = @"城市合伙人";
                }
                    break;
                case 5:
                {
                    self.cellImage.image = KImageName(@"kaidian");
                    self.cellTitle.text = @"修改结算账号";
                }
                    break;
                case 6:
                {
                    self.cellImage.image = KImageName(@"kaidian");
                    self.cellTitle.text = @"申请开店";
                }
                    break;
                case 7:
                {
                    self.cellImage.image = KImageName(@"kaidian");
                    self.cellTitle.text = @"商户信息";
                }
                    break;
                default:
                
                    break;
            }

        }
            break;
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
